{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### General parameters"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# The name of the batch or the name of the forlder were programs are\n",
    "batchName = 'batch_demo'\n",
    "\n",
    "# The ID of the first progam to be generated, serves as a seed for the random generator\n",
    "first_program_id = 2020\n",
    "# Number of functions to be generated\n",
    "number_of_functions = 15\n",
    "# Number of different schedules to generate for each program\n",
    "nb_schedule_per_function = 32\n",
    "\n",
    "# Path to the directory containing the programs\n",
    "data_path = './data/'+batchName+'/programs/'\n",
    "# Number of nodes in the cluster, Each node will do the job on a portion of the programs\n",
    "nb_nodes = 10\n",
    "# Path of the temporary files folder\n",
    "tmp_files_dir = './time_measurement/'\n",
    "# Path to the script that compile generators\n",
    "generator_script = './compile_tiramisu_code.py'\n",
    "# Path of to the script that compiles wrappers\n",
    "wrappers_script = './compile_tiramisu_wrappers.py'\n",
    "# Path to the script that execute the compiled wrappers\n",
    "execute_script = './execute_programs.py'\n",
    "# Path to where to store the logs of the jobs\n",
    "log_path = tmp_files_dir + \"log_\"+batchName+\"/\"\n",
    "# Path where to strore the resulting dataset file \n",
    "result_dataset_file = tmp_files_dir+'/processed_datasets/dataset_'+batchName+'.pkl'\n",
    "\n",
    "#please edit the paths accordingly in compile_tiramisu_code.py, compile_tiramisu_wrappers.py, execute programs.py"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pickle\n",
    "from pathlib import Path\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import dill\n",
    "from os import listdir\n",
    "import json \n",
    "from tqdm import tqdm\n",
    "import re\n",
    "import subprocess\n",
    "import random \n",
    "import time \n",
    "from multiprocessing import Pool\n",
    "from shutil import rmtree\n",
    "import sys\n",
    "sys.path.append(\"TiramisuCodeGenerator\")\n",
    "from TiramisuCodeGenerator import code_generator\n",
    "from data_gen_utils import cluster_utilities, annotation_utilities, dataset_utilities\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1. Generate synthetic Tiramisu programs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Generating  15  programs to  ./data/batch_demo/programs/\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 15/15 [00:02<00:00,  6.67it/s]\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Done\n",
      "Total number of schedules generated 396\n"
     ]
    }
   ],
   "source": [
    "# Generate programs using the program generator\n",
    "code_generator.generate_programs(seed=first_program_id, number_of_functions=number_of_functions, nb_schedule_per_function=nb_schedule_per_function, batchName=batchName, output_dir = data_path)\n",
    "\n",
    "cluster_utils = cluster_utilities(data_path, generator_script, wrappers_script, execute_script, log_path, batchName, nb_nodes, tmp_files_dir)\n",
    "\n",
    "# Create the list of programs that are in the given path\n",
    "cluster_utils.generate_prog_list()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2. Generators' Compilation and Execution"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "## Generate job files for compiling Tiramisu code\n",
    "cluster_utils.generate_compile_jobs()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Submit generators' compilation and execution jobs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Submitted batch job 15601\n",
      "Submitted batch job 15602\n",
      "Submitted batch job 15603\n",
      "Submitted batch job 15604\n",
      "Submitted batch job 15605\n",
      "Submitted batch job 15606\n",
      "Submitted batch job 15607\n",
      "Submitted batch job 15608\n",
      "Submitted batch job 15609\n",
      "Submitted batch job 15610\n",
      "\n"
     ]
    }
   ],
   "source": [
    "cluster_utils.submit_compile_jobs()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# print(cluster_utils.compile_jobs_ids)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "             JOBID PARTITION            NAME     USER ST       TIME  NODES NODELIST(REASON)\n",
      "             15610  lanka-v3 comp2_batch_dem mmerouan  R       1:08      1 lanka38\n",
      "             15601  lanka-v3 comp0_batch_dem mmerouan  R       1:09      1 lanka25\n",
      "             15602  lanka-v3 comp3_batch_dem mmerouan  R       1:09      1 lanka32\n",
      "             15603  lanka-v3 comp4_batch_dem mmerouan  R       1:09      1 lanka27\n",
      "             15604  lanka-v3 comp5_batch_dem mmerouan  R       1:09      1 lanka28\n",
      "             15605  lanka-v3 comp6_batch_dem mmerouan  R       1:09      1 lanka29\n",
      "             15606  lanka-v3 comp7_batch_dem mmerouan  R       1:09      1 lanka34\n",
      "             15607  lanka-v3 comp8_batch_dem mmerouan  R       1:09      1 lanka35\n",
      "             15608  lanka-v3 comp9_batch_dem mmerouan  R       1:09      1 lanka36\n",
      "             15609  lanka-v3 comp1_batch_dem mmerouan  R       1:09      1 lanka37\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_comp_0_0_39 <==\n",
      "  }\n",
      "}\n",
      "\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_comp_1_39_78 <==\n",
      "  }\n",
      "}\n",
      "\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_comp_2_78_117 <==\n",
      "  }\n",
      "}\n",
      "\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_comp_3_117_156 <==\n",
      "[c00, c01, c02, c03] -> { _comp01_update_1[i00, i01, i02, i03] -> input00[i00', i01', i02', i03'] : -1 - i02 + i02' = 0 }\n",
      "[c00, c01, c02, c03] -> { _comp01_update_1[i00, i01, i02, i03] -> input00[i00', i01', i02', i03'] : -i03 + i03' = 0 }\n",
      "[c00, c01, c02, c03] -> { _comp01_update_1[i00, i01, i02, i03] -> input00[i00', i01', i02', i03'] : -2 - i03 + i03' = 0 }\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_comp_4_156_195 <==\n",
      "  }\n",
      "}\n",
      "\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_comp_5_195_234 <==\n",
      "[c00, c01, c02, c03, c04, c05, c06, c07, c08, c09, c10, c11] -> { _comp02_update_1[i00, i01, i02, i03, i04] -> input00[i00', i04', i05, i06] : -i01 - i04 + i05 = 0 }\n",
      "[c00, c01, c02, c03, c04, c05, c06, c07, c08, c09, c10, c11] -> { _comp02_update_1[i00, i01, i02, i03, i04] -> input00[i00', i04', i05, i06] : -i02 + i06 = 0 }\n",
      "[c00, c01, c02, c03, c04, c05, c06, c07, c08, c09, c10, c11] -> { _comp02_update_1[i00, i01, i02, i03, i04] -> input00[i00', i04', i05, i06] : -i02 - i04 + i06 = 0 }\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_comp_6_234_273 <==\n",
      "  }\n",
      "}\n",
      "\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_comp_7_273_312 <==\n",
      "  }\n",
      "}\n",
      "\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_comp_8_312_351 <==\n",
      "  }\n",
      "}\n",
      "\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_comp_9_351_396 <==\n",
      "  }\n",
      "}\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "cluster_utils.check_compile_progress()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3. Wrappers' Compilation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Generate compile_wrappers and execute job files\n",
    "cluster_utils.generate_wrapper_jobs()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Submit wrapper's compilation jobs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Submitted batch job 15611\n",
      "Submitted batch job 15612\n",
      "Submitted batch job 15613\n",
      "Submitted batch job 15614\n",
      "Submitted batch job 15615\n",
      "Submitted batch job 15616\n",
      "Submitted batch job 15617\n",
      "Submitted batch job 15618\n",
      "Submitted batch job 15619\n",
      "Submitted batch job 15620\n",
      "\n"
     ]
    }
   ],
   "source": [
    "cluster_utils.submit_wrapper_compilation_jobs()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# print(cluster_utils.wrap_jobs_ids)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "             JOBID PARTITION            NAME     USER ST       TIME  NODES NODELIST(REASON)\n",
      "             15611  lanka-v3 wrap0_batch_dem mmerouan  R       0:17      1 lanka25\n",
      "             15612  lanka-v3 wrap3_batch_dem mmerouan  R       0:17      1 lanka32\n",
      "             15613  lanka-v3 wrap4_batch_dem mmerouan  R       0:17      1 lanka27\n",
      "             15614  lanka-v3 wrap5_batch_dem mmerouan  R       0:17      1 lanka28\n",
      "             15615  lanka-v3 wrap6_batch_dem mmerouan  R       0:17      1 lanka29\n",
      "             15616  lanka-v3 wrap7_batch_dem mmerouan  R       0:17      1 lanka34\n",
      "             15617  lanka-v3 wrap8_batch_dem mmerouan  R       0:17      1 lanka35\n",
      "             15618  lanka-v3 wrap9_batch_dem mmerouan  R       0:17      1 lanka36\n",
      "             15619  lanka-v3 wrap1_batch_dem mmerouan  R       0:17      1 lanka37\n",
      "             15620  lanka-v3 wrap2_batch_dem mmerouan  R       0:17      1 lanka38\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_wrap_0_0_39 <==\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_wrap_1_39_78 <==\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_wrap_2_78_117 <==\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_wrap_3_117_156 <==\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_wrap_4_156_195 <==\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_wrap_5_195_234 <==\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_wrap_6_234_273 <==\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_wrap_7_273_312 <==\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_wrap_8_312_351 <==\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_wrap_9_351_396 <==\n",
      "\n"
     ]
    }
   ],
   "source": [
    "cluster_utils.check_wrapper_compilation_progress()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4. Execute Programs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "cluster_utils.generate_execution_slurm_script()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Submit execution jobs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Submitted batch job 15631\n",
      "Submitted batch job 15632\n",
      "Submitted batch job 15633\n",
      "Submitted batch job 15634\n",
      "Submitted batch job 15635\n",
      "Submitted batch job 15636\n",
      "Submitted batch job 15637\n",
      "Submitted batch job 15638\n",
      "Submitted batch job 15639\n",
      "Submitted batch job 15640\n",
      "\n"
     ]
    }
   ],
   "source": [
    "#submit exec jobs\n",
    "cluster_utils.submit_execution_jobs()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "15631,15632,15633,15634,15635,15636,15637,15638,15639,15640\n"
     ]
    }
   ],
   "source": [
    "print(cluster_utils.exec_jobs_ids)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "             JOBID PARTITION            NAME     USER ST       TIME  NODES NODELIST(REASON)\n",
      "             15631  lanka-v3 exec0_batch_dem mmerouan  R       2:03      1 lanka25\n",
      "             15632  lanka-v3 exec3_batch_dem mmerouan  R       2:03      1 lanka32\n",
      "             15634  lanka-v3 exec5_batch_dem mmerouan  R       2:03      1 lanka28\n",
      "             15635  lanka-v3 exec6_batch_dem mmerouan  R       2:03      1 lanka29\n",
      "             15636  lanka-v3 exec7_batch_dem mmerouan  R       2:03      1 lanka34\n",
      "             15637  lanka-v3 exec8_batch_dem mmerouan  R       2:03      1 lanka35\n",
      "             15638  lanka-v3 exec9_batch_dem mmerouan  R       2:03      1 lanka36\n",
      "             15639  lanka-v3 exec1_batch_dem mmerouan  R       2:03      1 lanka37\n",
      "             15640  lanka-v3 exec2_batch_dem mmerouan  R       2:03      1 lanka38\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_exec_0_0_39 <==\n",
      "2020-10-28 12:22:46.259044-> 0/39\n",
      "2020-10-28 12:23:36.312226-> 20/39\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_exec_1_39_78 <==\n",
      "2020-10-28 12:22:46.534020-> 0/39\n",
      "2020-10-28 12:23:50.657375-> 20/39\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_exec_2_78_117 <==\n",
      "2020-10-28 12:22:46.562173-> 0/39\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_exec_3_117_156 <==\n",
      "2020-10-28 12:22:46.269422-> 0/39\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_exec_4_156_195 <==\n",
      "2020-10-28 12:22:46.333449-> 0/39\n",
      "2020-10-28 12:23:38.060135-> 20/39\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_exec_5_195_234 <==\n",
      "2020-10-28 12:22:46.589844-> 0/39\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_exec_6_234_273 <==\n",
      "2020-10-28 12:22:46.366924-> 0/39\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_exec_7_273_312 <==\n",
      "2020-10-28 12:22:46.734367-> 0/39\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_exec_8_312_351 <==\n",
      "2020-10-28 12:22:46.517342-> 0/39\n",
      "\n",
      "==> ./time_measurement/log_batch_demo/log_exec_9_351_396 <==\n",
      "2020-10-28 12:22:46.782765-> 0/45\n",
      "2020-10-28 12:24:14.256201-> 20/45\n",
      "\n"
     ]
    }
   ],
   "source": [
    "cluster_utils.check_execution_progress()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 5. Generate programs' annotation files"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "annot_utils= annotation_utilities()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 12/12 [00:03<00:00,  3.44it/s]\n"
     ]
    }
   ],
   "source": [
    "annot_utils.generate_json_annotations(str(cluster_utils.data_path))\n",
    "# annot_utils.generate_json_annotations_parallel(str(data_path),nb_threads=8)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 6. Save execution results into a dataset file"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  0%|          | 0/12 [00:00<?, ?it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "nb schedules 759\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 12/12 [00:00<00:00, 32.75it/s]\n"
     ]
    }
   ],
   "source": [
    "dataset_utils = dataset_utilities()\n",
    "dataset_utils.save_pkl_dataset(str(cluster_utils.data_path), \n",
    "                 cluster_utils.tmp_files_dir+'results_'+cluster_utils.batchName+'/parts/',\n",
    "                 result_dataset_file)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 7. Test the resulting dataset (optional)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|██████████| 12/12 [00:00<00:00, 5009.62it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Dataset location:  ./time_measurement/processed_datasets/dataset_batch_demo.pkl\n",
      "Number of schedules 395\n",
      "Schedules that didn't run: 0.25%\n",
      "Speedups >1 :27.59%\n",
      "Speedups >2 :7.85%\n",
      "Speedups <0.1 :4.56%\n",
      "Speedups 0.9<s<1.1 :19.75%\n",
      "Mean speedup: 1.17\n",
      "Median speedup: 0.81\n",
      "Max speedup: 12.91\n",
      "Min speedup: 0.022\n",
      "Speedup variance : 3.303\n",
      "Mean execution time: 0.509s\n",
      "Max execution time: 15.004s\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>function</th>\n",
       "      <th>schedule</th>\n",
       "      <th>exec_time</th>\n",
       "      <th>speedup</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>function002020</td>\n",
       "      <td>function002020_no_schedule</td>\n",
       "      <td>36.7585</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>function002020</td>\n",
       "      <td>function002020_schedule_0000</td>\n",
       "      <td>39.5655</td>\n",
       "      <td>0.929054</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>function002020</td>\n",
       "      <td>function002020_schedule_0001</td>\n",
       "      <td>24.4940</td>\n",
       "      <td>1.500714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>function002020</td>\n",
       "      <td>function002020_schedule_0002</td>\n",
       "      <td>354.2870</td>\n",
       "      <td>0.103753</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>function002020</td>\n",
       "      <td>function002020_schedule_0003</td>\n",
       "      <td>57.8945</td>\n",
       "      <td>0.634922</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>390</th>\n",
       "      <td>function002034</td>\n",
       "      <td>function002034_schedule_0027</td>\n",
       "      <td>38.2720</td>\n",
       "      <td>0.583325</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>391</th>\n",
       "      <td>function002034</td>\n",
       "      <td>function002034_schedule_0028</td>\n",
       "      <td>32.4420</td>\n",
       "      <td>0.688151</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>392</th>\n",
       "      <td>function002034</td>\n",
       "      <td>function002034_schedule_0029</td>\n",
       "      <td>45.3650</td>\n",
       "      <td>0.492119</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>393</th>\n",
       "      <td>function002034</td>\n",
       "      <td>function002034_schedule_0030</td>\n",
       "      <td>38.0245</td>\n",
       "      <td>0.587121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>394</th>\n",
       "      <td>function002034</td>\n",
       "      <td>function002034_schedule_0031</td>\n",
       "      <td>31.7475</td>\n",
       "      <td>0.703205</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>395 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           function                      schedule  exec_time   speedup\n",
       "0    function002020    function002020_no_schedule    36.7585  1.000000\n",
       "1    function002020  function002020_schedule_0000    39.5655  0.929054\n",
       "2    function002020  function002020_schedule_0001    24.4940  1.500714\n",
       "3    function002020  function002020_schedule_0002   354.2870  0.103753\n",
       "4    function002020  function002020_schedule_0003    57.8945  0.634922\n",
       "..              ...                           ...        ...       ...\n",
       "390  function002034  function002034_schedule_0027    38.2720  0.583325\n",
       "391  function002034  function002034_schedule_0028    32.4420  0.688151\n",
       "392  function002034  function002034_schedule_0029    45.3650  0.492119\n",
       "393  function002034  function002034_schedule_0030    38.0245  0.587121\n",
       "394  function002034  function002034_schedule_0031    31.7475  0.703205\n",
       "\n",
       "[395 rows x 4 columns]"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = dataset_utils.get_dataset_df(result_dataset_file)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
